#ifndef TANK_H_INCLUDED
#define TANK_H_INCLUDED

class Roquette;
class Canon;

#include "unite.h"
#include "../Arme/arme.h"
#include "../Arme/canon.h"
#include "../Arme/missile.h"
#include "../Arme/roquette.h"

class Tank : public Unite
{
    public:
    Tank(sf::Vector2f position, std::string image, sf::IntRect subVehicule,
            sf::IntRect subCanon, sf::Vector2f positioncanon
            , sf::Vector2f positioncanonflip, sf::Vector2f centre, Roquette roquette, int equipe);
    ~Tank();
    virtual void Afficher(sf::RenderWindow *app,sf::Vector2f vent, Terrain *terre, Game *jeu, std::vector<sf::Sprite> unite, bool visible);
    void ajouterAngle();
    void retirerAngle();
    void avancer(Terrain *terre);
    void reculer(Terrain *terre);
    void tirer(sf::Vector2f vent);
    void changeAngle(int angle);
    virtual sf::Vector2f GetRoquettePosition();
    virtual bool Evenement(int input, sf::RenderWindow *app, Terrain *m_terre, Game *jeu);
    Tank& operator=(const Tank &tank2);
    Canon *m_canon;

    private:
    sf::Vector2f m_taille;
    sf::SoundBuffer m_buffertank, m_buffercanon;
    sf::Sound m_soundtank, m_soundcanon;
    float m_volume;
    float  m_largeur, m_bouclier;
};

#endif // TANK_H_INCLUDED
